<title>User | Comments</title>
<?= $this->form ?>
<hr>
<h3>Past Comments:</h3><br>


<table class="table well">    
    <thead>
        <tr>
            <th>#</th>
            <th>Comment</th>
            <th>Date</th>
        </tr>
    </thead>
    <tbody>
    <?php
    $i = 1;
    $userDb = new Users_Model_Users();
    foreach ($this->allUsers as $user) {
        $output = $userDb->getAllCommentsByUser($user['id']);
        for ($index = sizeof($output) - 1; $index >= 0; $index--) {
            $comment = $output[$index]['comment'];
            $date = $output[$index]['date'];
            ?>
    <tr>
        <td class="span1"><?=$i;?></td>
        <td class="span12"><?=$comment?></td>
        <td class="span3"><?=$date?></td>
    </tr>

        <?php $i++;
        }
    }
    ?>
    </tbody>
</table>